package pack0909;

// 四大运算符---->算术运算符
public class DemoL {
    public static void main(String[] args) {
        int a = 4;
        int b = 3;
        // + - * / %
        int c1 = a + b; // 求和
        int c2 = a - b;
        int c3 = a * b;
        int c4 = a / b;  // 只要整数部分 注意：除数不能为0
        int c5 = a % b;
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
        System.out.println(c5);
        System.out.println("------------------------------------");
        int d = 9 + 6; // 求和
        String e = "9" + "6"; // 拼接字符串
        System.out.println(d);
        System.out.println(e);
        System.out.println("------------------------------------");
        // 自左向右依次计算，如果字符串和数字+，是拼接
        System.out.println(6 + 7 + "8" + 9);
    }
}